home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / OpenGL-ftn / fglrotate.z / fglrotate
Encoding:
Text File  |  2002-10-03  |  6.2 KB  |  144 lines

  1.  
  2.  
  3.  
  4. ffffggggllllRRRRoooottttaaaatttteeee((((3333GGGG))))                  OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee                  ffffggggllllRRRRoooottttaaaatttteeee((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ffffggggllllRRRRoooottttaaaatttteeeedddd,,,, ffffggggllllRRRRoooottttaaaatttteeeeffff - multiply the current matrix by a rotation matrix
  10.  
  11.  
  12. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      SUBROUTINE ffffggggllllRRRRoooottttaaaatttteeeedddd( REAL*4 _a_n_g_l_e,
  14.                             REAL*4 _x,
  15.                             REAL*4 _y,
  16.                             REAL*4 _z )
  17.      SUBROUTINE ffffggggllllRRRRoooottttaaaatttteeeeffff( REAL*4 _a_n_g_l_e,
  18.                             REAL*4 _x,
  19.                             REAL*4 _y,
  20.                             REAL*4 _z )
  21.  
  22.  
  23. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  24.      _a_n_g_l_e  Specifies the angle of rotation, in degrees.
  25.  
  26.      _x, _y, _z
  27.             Specify the _x, _y, and _z coordinates of a vector, respectively.
  28.  
  29. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  30.      ffffggggllllRRRRoooottttaaaatttteeee produces a rotation of _a_n_g_l_e degrees around the vector (x,y,z).
  31.      The current matrix (see ffffggggllllMMMMaaaattttrrrriiiixxxxMMMMooooddddeeee) is multiplied by a rotation matrix
  32.      with the product replacing the current matrix, as if ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx were
  33.      called with the following matrix as its argument:
  34.  
  35.  
  36.  
  37.  
  38.                (                                                    )
  39.  
  40.                |   2                                                |
  41.                              x (1-c) + c                xy(1-c) - zs                xz(1-c) + ys    0
  42.                |                                                    |
  43.  
  44.                |                   2                                |
  45.                              yx(1-c) + zs                y (1-c) + c                yz(1-c) - xs    0
  46.                |                                                    |
  47.  
  48.                |                                   2                |
  49.                         xz(1-c) - ys           yz(1-c) + xs           z (1-c) + c     0
  50.                |                                                    |
  51.  
  52.                (       0               0               0        1  )
  53.  
  54.      Where c = cos(angle), s = sin(angle), and ||( x,y,z )|| = 1 (if not, the
  55.      GL will normalize this vector).
  56.  
  57.  
  58.  
  59.      If the matrix mode is either GGGGLLLL____MMMMOOOODDDDEEEELLLLVVVVIIIIEEEEWWWW or GGGGLLLL____PPPPRRRROOOOJJJJEEEECCCCTTTTIIIIOOOONNNN, all objects
  60.      drawn after ffffggggllllRRRRoooottttaaaatttteeee is called are rotated.  Use ffffggggllllPPPPuuuusssshhhhMMMMaaaattttrrrriiiixxxx and
  61.      ffffggggllllPPPPooooppppMMMMaaaattttrrrriiiixxxx to save and restore the unrotated coordinate system.
  62.  
  63. NNNNOOOOTTTTEEEESSSS
  64.      This rotation follows the right-hand rule, so if the vector (x,y,z)
  65.      points toward the user, the rotation will be counterclockwise.
  66.  
  67. EEEERRRRRRRROOOORRRRSSSS
  68.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ffffggggllllRRRRoooottttaaaatttteeee is executed between the
  69.      execution of ffffggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ffffggggllllEEEEnnnndddd.
  70.  
  71.  
  72.  
  73.  
  74.                                                                         PPPPaaaaggggeeee 1111
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81. ffffggggllllRRRRoooottttaaaatttteeee((((3333GGGG))))                  OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee                  ffffggggllllRRRRoooottttaaaatttteeee((((3333GGGG))))
  82.  
  83.  
  84.  
  85. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  86.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____MMMMAAAATTTTRRRRIIIIXXXX____MMMMOOOODDDDEEEE
  87.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____CCCCOOOOLLLLOOOORRRR____MMMMAAAATTTTRRRRIIIIXXXX
  88.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____MMMMOOOODDDDEEEELLLLVVVVIIIIEEEEWWWW____MMMMAAAATTTTRRRRIIIIXXXX
  89.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____PPPPRRRROOOOJJJJEEEECCCCTTTTIIIIOOOONNNN____MMMMAAAATTTTRRRRIIIIXXXX
  90.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____TTTTEEEEXXXXTTTTUUUURRRREEEE____MMMMAAAATTTTRRRRIIIIXXXX
  91.  
  92.  
  93. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  94.      ffffggggllllMMMMaaaattttrrrriiiixxxxMMMMooooddddeeee, ffffggggllllMMMMuuuullllttttMMMMaaaattttrrrriiiixxxx, ffffggggllllPPPPuuuusssshhhhMMMMaaaattttrrrriiiixxxx, ffffggggllllSSSSccccaaaalllleeee, ffffggggllllTTTTrrrraaaannnnssssllllaaaatttteeee
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.                                                                         PPPPaaaaggggeeee 2222
  141.  
  142.  
  143.  
  144.